package cn.g31010.sip.vo
{
	import com.adobe.cairngorm.vo.IValueObject;
	
	import com.adobe.serialization.json.JSON;
	
	public class Gateway implements IValueObject
	{
		
		public var id:String;
		
		public var mediaserver:String;
		
		public var appserver:String;
		public var hessianTypeName:String = "cn.g31010.sip.pojo.Gateway";
		
		public function Gateway()
		{
		}
		
		public function toString():String{
			return JSON.encode(this);
		}
		
		public static function create(obj:Object):Gateway{
			if(obj==null)
				return null;
			var g:Gateway=new Gateway();
			if(obj.hasOwnProperty("id")){
				g.id=String(obj.id);
			}
			if(obj.hasOwnProperty("mediaserver")){
				g.mediaserver=String(obj.mediaserver);
			}
			if(obj.hasOwnProperty("appserver")){
				g.appserver=String(obj.appserver);
			}
			return g;
		}
	}
}